package xgggh.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by az on 2018/3/27.
 */

public class Auth implements Parcelable {
    private  String userId;
    private  String accessToken;
    private  long expiresIn;
    private  String tokenType;
    private  String scope;
    private  String refreshToken;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public long getExpiresIn() {
        return expiresIn;
    }

    public void setExpiresIn(long expiresIn) {
        this.expiresIn = expiresIn;
    }

    public String getTokenType() {
        return tokenType;
    }

    public void setTokenType(String tokenType) {
        this.tokenType = tokenType;
    }

    public String getScope() {
        return scope;
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

    public String getRefreshToken() {
        return refreshToken;
    }

    public void setRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.userId);
        dest.writeString(this.accessToken);
        dest.writeLong(this.expiresIn);
        dest.writeString(this.tokenType);
        dest.writeString(this.scope);
        dest.writeString(this.refreshToken);
    }

    public Auth() {
    }

    protected Auth(Parcel in) {
        this.userId = in.readString();
        this.accessToken = in.readString();
        this.expiresIn = in.readLong();
        this.tokenType = in.readString();
        this.scope = in.readString();
        this.refreshToken = in.readString();
    }

    public static final Parcelable.Creator<Auth> CREATOR = new Parcelable.Creator<Auth>() {
        @Override
        public Auth createFromParcel(Parcel source) {
            return new Auth(source);
        }

        @Override
        public Auth[] newArray(int size) {
            return new Auth[size];
        }
    };
}
